package com.ht.common.core.valid;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;


@Target({ ElementType.METHOD, ElementType.TYPE,ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {StrValRangeValidator.class})
public @interface StrValueRange {
	 // 默认错误消息
    String message() default "参数不在给定范围";

    // 分组
    Class<?>[] groups() default {};

    // 负载
    Class<? extends Payload>[] payload() default {};

    String[] values() default {};
    /**
     * 默认 必须有值true，为false可以试不必须得
     * @return
     */
    boolean required() default true;

}
